#encoding:utf8
#@author wangyizhong
#@date 2020-12-10
#@desc UDF deploy script!!!
#eg.
#psql -h 10.5.24.18 -d aiworks -p 2345 -U gpadmin -w gp2020 -f testtmpp/columnToVec2.py
#

PSQL=/usr/local/greenplum-db/bin/psql
DBNAME=aiworks
USER=gpadmin
PORT=2345
HOST=10.5.24.18
PASSWORD=gp2020
basePath=./src/main/resources/madlib/

for item in `ls $basePath`
do
	cmd="$PSQL -h $HOST -d $DBNAME -p $PORT -U $USER -w $PASSWORD -f $basePath/$item"		
	echo $cmd
	eval $cmd
done
